// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#include "leveldb/options.h"

#include "leveldb/comparator.h"
#include "leveldb/env.h"

namespace leveldb {

Options::Options()
    : comparator(BytewiseComparator()),
      create_if_missing(false),
      error_if_exists(false),
      paranoid_checks(false),
      env(Env::Default()),
      info_log(NULL),
      write_buffer_size(4<<20),
      max_open_files(1000),
      block_cache(NULL),
      block_size(4096),
      block_restart_interval(16),
      compression(kSnappyCompression),
      filter_policy(NULL)
//      ,
//      buffer_size_0(1048576),
//      buffer_size_1(1048576),
//      buffer_size_2(1048576),
//      buffer_size_3(1048576),
//      buffer_size_4(1048576),
//      buffer_size_5(1048576),
//      buffer_size_6(1048576)
      {
#if defined(DA_LSM)
    const uint64_t MB = 1 * 1024 * 1024;
//    const uint64_t GB = 1 * 1024 * 1024 * 1024;
    buffer_size[0] = 1*MB;
    buffer_size[1] = 1*MB;
    buffer_size[2] = 1*MB;
    buffer_size[3] = 1*MB;
    buffer_size[4] = 1*MB;
    buffer_size[5] = 1*MB;
    buffer_size[6] = 1*MB;
//    buffer_size[0] = 1*1024*1024;
//    buffer_size[1] = 1*1024*1024;
//    buffer_size[2] = 1*1024*1024;
//    buffer_size[3] = 1*1024*1024;
//    buffer_size[4] = 1*1024*1024;
//    buffer_size[5] = 1*1024*1024;
//    buffer_size[6] = 1*1024*1024;
    level_statistics[0] = -1;
    level_statistics[1] = -1;
    level_statistics[2] = -1;
    level_statistics[3] = -1;
    level_statistics[4] = -1;
    level_statistics[5] = -1;
    level_statistics[6] = -1;    
#endif
}

}  // namespace leveldb
